<?php

/**
 * AbetRoom form base class.
 *
 * @method AbetRoom getObject() Returns the current form's model object
 *
 * @package    sfproject
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseAbetRoomForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'               => new sfWidgetFormInputHidden(),
      'room_num'         => new sfWidgetFormInputText(),
      'room_type'        => new sfWidgetFormInputText(),
      'stu_t'            => new sfWidgetFormInputText(),
      'has_dis_teach_eq' => new sfWidgetFormInputCheckbox(),
      'build_name'       => new sfWidgetFormInputText(),
      'created_at'       => new sfWidgetFormDateTime(),
      'updated_at'       => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'               => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'room_num'         => new sfValidatorString(array('max_length' => 4, 'required' => false)),
      'room_type'        => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'stu_t'            => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'has_dis_teach_eq' => new sfValidatorBoolean(array('required' => false)),
      'build_name'       => new sfValidatorString(array('max_length' => 4, 'required' => false)),
      'created_at'       => new sfValidatorDateTime(array('required' => false)),
      'updated_at'       => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('abet_room[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetRoom';
  }


}
